package com.bocloud.cmp.dao;

import java.util.List;

import com.bocloud.cmp.entity.resource.Region;

/**
 * 区域管理DAO接口
 * 
 * @author dongkai
 *
 */
public interface RegionDao {

	/**
	 * 查询
	 * 
	 * @param vendorId
	 * @return
	 * @throws Exception
	 */
	public List<Region> list(Long vendorId) throws Exception;

	/**
	 * 保存
	 * 
	 * @param region
	 * @return
	 * @throws Exception
	 */
	public Region save(Region region) throws Exception;

	/**
	 * 根据ID查询
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public Region query(Long id) throws Exception;

	/**
	 * 根据RegionId查询
	 * 
	 * @param regionId
	 * @param vendorId
	 * @return
	 * @throws Exception
	 */
	public Region getByRegionId(String regionId, Long vendorId) throws Exception;

	/**
	 * 修改
	 * 
	 * @param region
	 * @return
	 * @throws Exception
	 */
	public boolean modify(Region region) throws Exception;

	/**
	 * 删除
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public boolean delete(Long id) throws Exception;

	/**
	 * 根据VendorId删除
	 * 
	 * @param vendorId
	 * @return
	 * @throws Exception
	 */
	public boolean deleteByVid(Long vendorId) throws Exception;
	
	/**
	 * 
	 * @param region
	 * @return
	 * @throws Exception
	 */
	public boolean update(Region region) throws Exception;

}
